    package com.bw.lib_storage.mmkv



    import com.bw.lib_storage.mmkv.utils.MMKVOwner
    import com.bw.lib_storage.mmkv.utils.MMKVProperty
    import com.tencent.mmkv.MMKV


    object AuthMMKV: MMKVOwner {
        //  MMKV实例 auth文件中
        override val mmkv: MMKV
            get() = MMKV.mmkvWithID("auth")

        //token
        var token by MMKVProperty("")

        //username
        var username by MMKVProperty("")

        var userid by MMKVProperty(0)

        // 已登录
        fun hasLogin() = token.isNotEmpty()

    }